package lb.io.apimachinery.runtime.scheme;

public class GroupVersionKind {
    private String group;

    private String version;

    private String kind;

    public GroupVersionKind() { }

    /**
     * @param apiVersion
     * @param kind
     */
    public GroupVersionKind(String apiVersion, String kind) {
        GroupVersion gv = new GroupVersion(apiVersion);
        this.group = gv.getGroup();
        this.version = gv.getVersion();
        this.kind = kind;
    }

    /**
     * @param group
     * @param version
     * @param kind
     */
    public GroupVersionKind(String group, String version, String kind) {
        this.group = group;
        this.version = version;
        this.kind = kind;
    }

    public String getGroup() {
        return group;
    }

    public void setGroup(String group) {
        this.group = group;
    }

    public String getVersion() {
        return version;
    }

    public void setVersion(String version) {
        this.version = version;
    }

    public String getKind() {
        return kind;
    }

    public void setKind(String kind) {
        this.kind = kind;
    }

    public GroupKind GroupKind() {
        return new GroupKind(group, kind);
    }

    public GroupVersion GroupVersion() {
        return new GroupVersion(group, version);
    }

    @Override
    public String toString() {
        return group + "/" + version + ", Kind=" + kind;
    }
}
